<?php
namespace Admin\Controller;
use Think\Controller;
class GoodsCategoryController extends  CommonController{
		
    /**商品添加
       * undocumented function
       *
       * @return void
       * @author 
       **/
      function add(){
      {
        if (IS_POST){
  
      $all = $this->Model->data($_POST)->add();

    
       
        if ($all>0) {

           $this->success('添加成功',(U('GoodsCategory/lists')),2);die; 

           }

          }
      
      
        }
      $data = $this->Model->where('pid=0')->select();
      $this->assign('data',$data);
      $this->display();
      } 

      /**
       * undocumented function
       *
       * @return void
       * @author 
       **/
      function lists()
      {

      $lists = $this->Model->where('pid=0')->select();
      $this->assign('lists',$lists);
      $this->display();
    }
}